--opciones como en la piupc :P ahora sí sirven, bendito lua xD
local function PlayerOptions(pn)
	--no player, no job
	if not GAMESTATE:IsPlayerEnabled(pn) then return Def.Actor {} end
	
	local Playerstate = GAMESTATE:GetPlayerState(pn)
	local options = Playerstate:GetPlayerOptions('ModsLevel_Preferred')
	options = string.lower(options)
	local SepOption = split(", ", options)
	local speed = 1
	
	--puedes declarar variables en una sola línea
	--los valores serán respectivamente:
	local rand, mirr, vnsh, nons = "r", "m", "v", "n"
	
	for i=1,#SepOption do
		if string.find(SepOption[i],"%dx") ~= nil then
			--tomar el primer caracter del speedmod y volverlo número
			speed = tonumber(string.sub(SepOption[i],0,1))
			--no hay gráfico speed de 5 para arriba...
			if speed > 4 then
				speed = 4
			end
		end
		if string.find(SepOption[i],"shuffle") or string.find(SepOption[i],"supershuffle") then
			rand = "R"
		end
		if string.find(SepOption[i],"left") or string.find(SepOption[i],"right") or string.find(SepOption[i],"mirror") then
			mirr = "M"
		end
		if string.find(SepOption[i],"hidden") or string.find(SepOption[i],"sudden") or string.find(SepOption[i],"randomvanish") then
			vnsh = "V"
		end
		if string.find(SepOption[i],"stealth") then
			nons = "N"
		end
	end
	
	--custom fonts
	return LoadFont("_SpecialTyphos")..{
		Text=string.format("%d\n%s\n%s\n%s\n%s",speed,rand,mirr,vnsh,nons);
		InitCommand=cmd(y,184;shadowlength,0;zoom,1.12;vertalign,top);
	}
end

local t = Def.ActorFrame {}

if not GAMESTATE:IsDemonstration() then
	for i=1,NUM_PLAYERS do
		if not GAMESTATE:IsSideJoined(tostring("PlayerNumber_P"..i)) then
			t[#t+1] = LoadActor("wait")..{
				InitCommand=function(self)
					(cmd(y,SCREEN_BOTTOM-30;zoomto,165,24;diffuseshift;effectperiod,2;effectcolor1,1,1,1,0;effectcolor2,1,1,1,1))(self);
					--self:player();
					self:x(i == 1 and 135 or SCREEN_WIDTH-135);
				end;
			}
		end
	end
end

t[#t+1] = PlayerOptions(PLAYER_1)..{
	InitCommand=cmd(x,28);
}
t[#t+1] = PlayerOptions(PLAYER_2)..{
	InitCommand=cmd(x,SCREEN_RIGHT-28);
}
t[#t+1] = LoadFont("IMPACT")..{
	--Text=(UNLOCKMAN:GetSongsUnlockedByEntryID("CanonX1")[1]:GetSongDir());
	InitCommand=cmd(shadowlength,0;zoom,1;x,SCREEN_CENTER_X;y,200);
}

--[[local curstyle = GAMESTATE:GetCurrentStyle():GetName()
local diff = GAMESTATE:GetCurrentSteps(PLAYER_2):GetDifficulty()

t[#t+1] = LoadFont("ArialOutline")..{
	InitCommand=cmd(shadowlength,0;zoom,0.8;x,SCREEN_CENTER_X;y,SCREEN_BOTTOM-150);
	Text=curstyle.."\n"..diff;
}]]

return t